package bullets;

import java.awt.Graphics;
import java.awt.image.BufferedImage;

public class BulletWing extends HeroBullet {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8861364182012666907L;
	private static BufferedImage image;
	static {
		image = readImage("src/images/wingbullet.png");
		
	}

	// 因为子弹出现的位置和僚机有关
	public BulletWing(int x, int y,int flag, int bulletSpeed) {
		this.x=x;
		this.y=y;
		this.width=17;
		this.height=52;
		this.heroFlag=flag;
		speed = bulletSpeed;
	}
	
	
	public BufferedImage getImage() {
		if (isLife()) {// 如果活着
			return image;
		} else if (isDead()) {
			status = remove;
		}
		return null;
	}
	//是否越界
	public boolean outOfBounds() {
		return super.outOfBounds();
	}
	
	public void move() {
		
	}


	@Override
	public void step() {
		y-=speed;	
	}


	@Override
	public void paintImage(Graphics g) {	
		g.drawImage(image, x, y,null);
	}
	
}
